package com.biz.primus.management.order.feign;


import com.biz.primus.base.vo.PageResult;
import com.biz.primus.model.oms.vo.*;
import com.biz.primus.model.oms.vo.returns.AuditRequestVo;
import com.biz.primus.model.oms.vo.returns.OmsReturnVo;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * @author zzy
 * @rema 已派单控制层调用接口
 * @date 2017/11/14/009
 */
@FeignClient(qualifier = "omsFeignClient", name = "service-oms")
public interface OmsFeignClient {

    /**
     * 查询派单列表(根据订单状态'已分单',订单编码,门店编码,配送方式)
     * @param orderQueryVo     oms订单查询对象
     * @return
     */
    @PostMapping("soa/managementAllocation/managementOrderQuery")
    PageResult<OmsOrderVo> managementOrderQuery(@RequestBody OrderQueryVo orderQueryVo);

    /**
     * 后台获取订单详情信息
     * @param orderCode 订单编码
     * @return
     */
    @GetMapping("soa/managementAllocation/getOrderDetail")
    OmsOrderRespVo getOrderDetail(@RequestParam("orderCode") String orderCode);

    /**
     * 修改收货信息
     * @param changeShippingInfoRequest 修改配送请求请求对象
     */
    @PostMapping("soa/managementAllocation/changeConsigneeInfo")
    void changeConsigneeInfo(@RequestBody ChangeShippingInfoRequest changeShippingInfoRequest);

    /**
     * 改派(改派订单提交没有拆单)
     * @param orderDispatchingRequest 改派对象
     */
    @PostMapping("soa/managementAllocation/dispatching")
    void  dispatching(@RequestBody OrderDispatchingRequest orderDispatchingRequest);

    /**
     * 拆单(改派订单提交拆单)
     * @param splitRequestVo 改派拆单对象
     */
    @PostMapping("soa/managementAllocation/orderSplit")
    void orderSplit(@RequestBody SplitRequestVo splitRequestVo);

    /**
     * 后台退单列表查询
     * OmsManagementReturnController
     *
     * @param orderReturnQueryVo
     * @return
     */
    @GetMapping("soa/managementReturn/managementReturnQuery")
    PageResult<OmsReturnVo> managementReturnQuery(@RequestBody OrderReturnQueryVo orderReturnQueryVo);

    /**
     * 审核退单详情(售后审核详情)
     * @param returnCode    退单编码
     * @return
     */
    @GetMapping("soa/managementReturn/auditReturnDetail")
    OmsReturnVo auditReturnDetail(@RequestParam("returnCode")String returnCode);

    /**
     * 审核退单
     * @param auditRequestVo    审核结果
     */
    @PostMapping("soa/managementReturn/auditReturn")
    void auditReturn(@RequestBody AuditRequestVo auditRequestVo);

    /**
     * 查询所有订单拦截规则
     * @return
     */
    @PostMapping("soa/managementMonitor/findAllOrderIntercept")
    PageResult<OrderInterceptVo> findAllOrderIntercept(OrderInterceptQueryVo orderInterceptQueryVo);
}
